source changes
authorAlex Crichton <alex@alexcrichton.com>
Fri, 17 Oct 2014 19:22:52 +0000 (12:22 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 22 Oct 2014 18:29:52 +0000 (11:29 -0700)
src/cargo/core/source.rs

index 1e6df19d506fee7b755ff1477b7085dedbe570fc..3740ca3eaf27cd0b4e4615ac5a45e065f20fedc4 100644 (file)
@@ -449,11 +449,11 @@ mod tests {
         let s1 = SourceId::new(GitKind("master".to_string()), loc);
 
         let loc = "git://github.com/foo/bar".to_url().unwrap();
-        let mut s2 = SourceId::new(GitKind("master".to_string()), loc);
+        let s2 = SourceId::new(GitKind("master".to_string()), loc.clone());
 
         assert_eq!(s1, s2);
 
-        s2.kind = GitKind("foo".to_string());
-        assert!(s1 != s2);
+        let s3 = SourceId::new(GitKind("foo".to_string()), loc);
+        assert!(s1 != s3);
     }
 }